/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-03-22
 * Time: 18:23
 */
public class Main {
    public static void main(String[] args) {
        Animal animal1 = new Dog();//向上转型的另一种方式
        Animal animal2 = new Cat();
        Animal animal3 = new Bird();
        animal1.eat();
        animal2.eat();
        animal3.eat();
    }
}
/*

运行：
        吃骨头！！！
        吃鱼！！！
        吃鸟粮
*/
